Integrand size = 23, antiderivative size = 122 \[ \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {1}{16} \left (5 a^2+2 a b+b^2\right ) x+\frac {\left (5 a^2+2 a b+b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {(a-b) (5 a+3 b) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {(a-b) \cos ^5(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 d} \]
1/16*(5*a^2+2*a*b+b^2)*x+1/16*(5*a^2+2*a*b+b^2)*cos(d*x+c)*sin(d*x+c)/d+1/ 24*(a-b)*(5*a+3*b)*cos(d*x+c)^3*sin(d*x+c)/d+1/6*(a-b)*cos(d*x+c)^5*sin(d* x+c)*(a+b*tan(d*x+c)^2)/d
Result contains complex when optimal does not.
Time = 1.32 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.71 \[ \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {12 ((1-2 i) a+b) ((1+2 i) a+b) (c+d x)+3 (5 a-b) (3 a+b) \sin (2 (c+d x))+3 (a-b) (3 a+b) \sin (4 (c+d x))+(a-b)^2 \sin (6 (c+d x))}{192 d} \]
(12*((1 - 2*I)*a + b)*((1 + 2*I)*a + b)*(c + d*x) + 3*(5*a - b)*(3*a + b)* Sin[2*(c + d*x)] + 3*(a - b)*(3*a + b)*Sin[4*(c + d*x)] + (a - b)^2*Sin[6* (c + d*x)])/(192*d)
Time = 0.29 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.10, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4158, 315, 298, 215, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \tan (c+d x)^2\right )^2}{\sec (c+d x)^6}dx\) |
\(\Big \downarrow \) 4158 |
\(\displaystyle \frac {\int \frac {\left (b \tan ^2(c+d x)+a\right )^2}{\left (\tan ^2(c+d x)+1\right )^4}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 315 |
\(\displaystyle \frac {\frac {1}{6} \int \frac {3 b (a+b) \tan ^2(c+d x)+a (5 a+b)}{\left (\tan ^2(c+d x)+1\right )^3}d\tan (c+d x)+\frac {(a-b) \tan (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 \left (\tan ^2(c+d x)+1\right )^3}}{d}\) |
\(\Big \downarrow \) 298 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (5 a^2+2 a b+b^2\right ) \int \frac {1}{\left (\tan ^2(c+d x)+1\right )^2}d\tan (c+d x)+\frac {(a-b) (5 a+3 b) \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}\right )+\frac {(a-b) \tan (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 \left (\tan ^2(c+d x)+1\right )^3}}{d}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (5 a^2+2 a b+b^2\right ) \left (\frac {1}{2} \int \frac {1}{\tan ^2(c+d x)+1}d\tan (c+d x)+\frac {\tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )+\frac {(a-b) (5 a+3 b) \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}\right )+\frac {(a-b) \tan (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 \left (\tan ^2(c+d x)+1\right )^3}}{d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (5 a^2+2 a b+b^2\right ) \left (\frac {1}{2} \arctan (\tan (c+d x))+\frac {\tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )+\frac {(a-b) (5 a+3 b) \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}\right )+\frac {(a-b) \tan (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 \left (\tan ^2(c+d x)+1\right )^3}}{d}\) |
(((a - b)*Tan[c + d*x]*(a + b*Tan[c + d*x]^2))/(6*(1 + Tan[c + d*x]^2)^3) + (((a - b)*(5*a + 3*b)*Tan[c + d*x])/(4*(1 + Tan[c + d*x]^2)^2) + (3*(5*a ^2 + 2*a*b + b^2)*(ArcTan[Tan[c + d*x]]/2 + Tan[c + d*x]/(2*(1 + Tan[c + d *x]^2))))/4)/6)/d
3.5.49.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) /(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1 ), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 *p])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 2*p + 3))/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[(a*d - c*b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(2*a*b*(p + 1))), x] - Simp[1/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^(q - 2)*S imp[c*(a*d - c*b*(2*p + 3)) + d*(a*d*(2*(q - 1) + 1) - b*c*(2*(p + q) + 1)) *x^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, - 1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, 2, p, q, x]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[ff/(c^(m - 1)*f) Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Time = 27.96 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.36
method | result | size |
derivativedivides | \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{3}}{6}-\frac {\cos \left (d x +c \right )^{3} \sin \left (d x +c \right )}{8}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{5} \sin \left (d x +c \right )}{6}+\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )+a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}\) | \(166\) |
default | \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{3}}{6}-\frac {\cos \left (d x +c \right )^{3} \sin \left (d x +c \right )}{8}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )+2 a b \left (-\frac {\cos \left (d x +c \right )^{5} \sin \left (d x +c \right )}{6}+\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )+a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}\) | \(166\) |
risch | \(\frac {5 x \,a^{2}}{16}+\frac {x a b}{8}+\frac {x \,b^{2}}{16}+\frac {\sin \left (6 d x +6 c \right ) a^{2}}{192 d}-\frac {\sin \left (6 d x +6 c \right ) a b}{96 d}+\frac {\sin \left (6 d x +6 c \right ) b^{2}}{192 d}+\frac {3 \sin \left (4 d x +4 c \right ) a^{2}}{64 d}-\frac {\sin \left (4 d x +4 c \right ) a b}{32 d}-\frac {\sin \left (4 d x +4 c \right ) b^{2}}{64 d}+\frac {15 \sin \left (2 d x +2 c \right ) a^{2}}{64 d}+\frac {\sin \left (2 d x +2 c \right ) a b}{32 d}-\frac {\sin \left (2 d x +2 c \right ) b^{2}}{64 d}\) | \(169\) |
1/d*(b^2*(-1/6*sin(d*x+c)^3*cos(d*x+c)^3-1/8*cos(d*x+c)^3*sin(d*x+c)+1/16* cos(d*x+c)*sin(d*x+c)+1/16*d*x+1/16*c)+2*a*b*(-1/6*cos(d*x+c)^5*sin(d*x+c) +1/24*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+1/16*d*x+1/16*c)+a^2*(1/6*( cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*sin(d*x+c)+5/16*d*x+5/16*c) )
Time = 0.27 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.80 \[ \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} d x + {\left (8 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (5 \, a^{2} + 2 \, a b - 7 \, b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d} \]
1/48*(3*(5*a^2 + 2*a*b + b^2)*d*x + (8*(a^2 - 2*a*b + b^2)*cos(d*x + c)^5 + 2*(5*a^2 + 2*a*b - 7*b^2)*cos(d*x + c)^3 + 3*(5*a^2 + 2*a*b + b^2)*cos(d *x + c))*sin(d*x + c))/d
\[ \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\int \left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2} \cos ^{6}{\left (c + d x \right )}\, dx \]
Time = 0.31 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.07 \[ \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\frac {3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} {\left (d x + c\right )} + \frac {3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} \tan \left (d x + c\right )^{5} + 8 \, {\left (5 \, a^{2} + 2 \, a b - b^{2}\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (11 \, a^{2} - 2 \, a b - b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{6} + 3 \, \tan \left (d x + c\right )^{4} + 3 \, \tan \left (d x + c\right )^{2} + 1}}{48 \, d} \]
1/48*(3*(5*a^2 + 2*a*b + b^2)*(d*x + c) + (3*(5*a^2 + 2*a*b + b^2)*tan(d*x + c)^5 + 8*(5*a^2 + 2*a*b - b^2)*tan(d*x + c)^3 + 3*(11*a^2 - 2*a*b - b^2 )*tan(d*x + c))/(tan(d*x + c)^6 + 3*tan(d*x + c)^4 + 3*tan(d*x + c)^2 + 1) )/d
Leaf count of result is larger than twice the leaf count of optimal. 4487 vs. \(2 (114) = 228\).
Time = 23.36 (sec) , antiderivative size = 4487, normalized size of antiderivative = 36.78 \[ \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=\text {Too large to display} \]
1/48*(3*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2 *tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^6*tan(c)^6 + 15*a^2*d *x*tan(d*x)^6*tan(c)^6 + 6*a*b*d*x*tan(d*x)^6*tan(c)^6 + 3*b^2*d*x*tan(d*x )^6*tan(c)^6 + 3*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2 *tan(d*x) - 2*tan(c))*tan(d*x)^6*tan(c)^6 + 9*pi*a*b*sgn(2*tan(d*x)^2*tan( c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2* tan(c))*tan(d*x)^6*tan(c)^4 + 9*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn( -2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d* x)^4*tan(c)^6 + 6*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*ta n(d*x)^6*tan(c)^6 - 6*a*b*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1 ))*tan(d*x)^6*tan(c)^6 + 45*a^2*d*x*tan(d*x)^6*tan(c)^4 + 18*a*b*d*x*tan(d *x)^6*tan(c)^4 + 9*b^2*d*x*tan(d*x)^6*tan(c)^4 + 9*pi*a*b*sgn(-2*tan(d*x)^ 2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^6*tan(c)^ 4 + 45*a^2*d*x*tan(d*x)^4*tan(c)^6 + 18*a*b*d*x*tan(d*x)^4*tan(c)^6 + 9*b^ 2*d*x*tan(d*x)^4*tan(c)^6 + 9*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x) *tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(c)^6 + 9*pi*a*b*sgn(2*ta n(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2* tan(d*x) - 2*tan(c))*tan(d*x)^6*tan(c)^2 + 27*pi*a*b*sgn(2*tan(d*x)^2*tan( c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2* tan(c))*tan(d*x)^4*tan(c)^4 + 18*a*b*arctan((tan(d*x) + tan(c))/(tan(d*...
Time = 13.03 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.03 \[ \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx=x\,\left (\frac {5\,a^2}{16}+\frac {a\,b}{8}+\frac {b^2}{16}\right )+\frac {\left (\frac {5\,a^2}{16}+\frac {a\,b}{8}+\frac {b^2}{16}\right )\,{\mathrm {tan}\left (c+d\,x\right )}^5+\left (\frac {5\,a^2}{6}+\frac {a\,b}{3}-\frac {b^2}{6}\right )\,{\mathrm {tan}\left (c+d\,x\right )}^3+\left (\frac {11\,a^2}{16}-\frac {a\,b}{8}-\frac {b^2}{16}\right )\,\mathrm {tan}\left (c+d\,x\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^6+3\,{\mathrm {tan}\left (c+d\,x\right )}^4+3\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \]